<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title></title>
    <link rel="stylesheet" th:href="@{/static/bootstrap/css/bootstrap.min.css}">
    <script th:src="@{/static/js/jquery-3.3.1.min.js}"></script>
    <script th:src="@{/static/bootstrap/js/bootstrap.min.js}"></script>
    <script type="text/javascript" charset="utf-8"
            th:src="@{/static/ckeditor/ckeditor.js}"></script>
</head>
<body>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-1 main">
    <div class="text-right ">
        <span class="glyphicon glyphicon-hand-right" aria-hidden="true"></span>
        <a th:href="@{toAdminHome}" >点此返回主页</a>
    </div>
    <form th:action="@{updateNews}" method="post">
        <div class="table-responsive">
            <h2 class="sub-header">编辑公告</h2>
            <div class="col-md-11">
                <input type="hidden" name="id" th:value="${news.id }"/>
                <input type="text" class="form-control" name="title" id="title" placeholder="在此输入公告标题" th:value="${news.title }">
                <textarea id="article" name="article" th:utext="${news.article }"></textarea>
                <script type="text/javascript">
                    CKEDITOR.replace("article");
                </script>
            </div>
            <div class="col-md-11">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">发布选项</h3>
                    </div>
                    <div class="panel-body">
                        <div class="form-group status">
                            <p>公告状态</p>
                            <label class="radio-inline">
                                <input type="radio" name="status" value="1" checked=""> 发布
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="status" value="0"> 草稿
                            </label>
                        </div>
                        <button class="btn btn-primary">提交</button>
                        <button class="btn btn-primary">保存草稿</button>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
</body>
</html>
